package com.创建型模式.工厂模式.aimal;

public class AnimalDemo {
    public static void main(String[] args) {
        AnimalFactory factory = new AnimalFactory();
        Animal a1 = factory.getAnimal(1);
        a1.eat();
        Animal a2 = factory.getAnimal(2);
        a2.eat();
        Animal a3 = factory.getAnimal(3);
        a3.eat();
        
    }
}
